#include "Menu.h"
#include <iostream>
#include <fstream>
//additional includes
#include "Date.h"         //added MF
#include "Cart.h"         //added MF
#include "Cart_item.h"    //added MF


using namespace std;

Menu::Menu()
{
}

void Menu::display_main_menu() const 
{
	cout << "Here is the MAIN MENU \n";
}
void Menu::display_info() const
{
	cout << "Here is the Info requested \n";//display Project Part I, team name and team members
	cout << "----------------Project Part I----------------"<<endl;//added MF
	cout << "Team Name   : 						 Blue-ABC-2"<<endl;//added MF
	cout << "Team Members: 						           "<<endl;//added MF
	cout << "           		            Matthew Fischer"<<endl;//added MF
	cout << "           		            Binayak Acharya"<<endl;//added MF
	cout << "           		              Sidik Soleman"<<endl;//added MF
	cout << "----------------------------------------------"<<endl;//added MF
	
}

void Menu::read()
{
	cout << "Read file name then read store data \n";
	ifstream cartFile("../Sample_Data/carts.dat", ifstream::in); //added MF
	
	int num_cart; //added MF
	cartFile >> num_cart;
	for(int i=0 ; i<num_cart;++i)
	{
		int cart_Id; //added MF
		int cust_Id; //added MF
		int year_row; //added MF
		int month_row; //added MF
		int day_row; //added MF
		
		cartFile >> cart_Id >> cust_Id >> year_row >> month_row >> day_row; //added MF
		Date x(year_row,Date::Month(month_row),day_row); //added MF
		Cart a(cart_Id,cust_Id,x); //added MF
		carts.push_back(a); //added MF
	}
	
	cartFile >> num_cart;
	for(int i=0 ; i<num_cart;++i)//added MF
	{
		int cartId;//added MF
		int custId;//added MF
		int prodId;//added MF
		int prodqty;//added MF
		
		
		cartFile >> cartId >> custId >> prodId >> prodqty;//added MF
		Cart_item info(cartId,custId,prodId,prodqty);//added MF
		cart_items.push_back(info); //added MF
	}
	
}
void Menu::show() const 
{
	cout << "Show queries \n";
		
}
void Menu::find() const 
{
	cout << "Find queries \n";
}
void Menu::update()  
{
	cout << "Update queries \n";
}